<html>
<head>
  <style>
 
  
  </style>  
  <script type="text/tiscript">
  
  
    const el = $(#edit);
    
    event click $(button#do-sel)
    {
      el.edit.select(0,5);
      view.focus = el;
    }
    $(button#do-sel-all).onClick = function()
    {
      el.edit.selectAll();
      view.focus = el;
    }
    
  </script>  
</head>
<body>
  <button #do-sel>Select "Hello"</button> <button #do-sel-all>Select All</button><br/>
  Text: <input #edit type=text value="Hello World!"/> 
</body>
</html>